package com.smartleanx.module.hrm.dal.mysql.salary;


import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartleanx.module.hrm.dal.dataobject.salary.HrmSalaryPlanEmployee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author mybatis-plus
 * @since 2024-12-26
 */
@Mapper
public interface HrmSalaryPlanEmployeeMapper extends BaseMapper<HrmSalaryPlanEmployee> {


    @Select("SELECT COUNT(DISTINCT hspe.employee_id) AS total FROM hrm_salary_plan_employee hspe" +
            " left join hrm_employee he on he.deleted=0 and he.user_id=hspe.employee_id WHERE hspe.tenant_id = 1 and he.tenant_id=1 ")
    Long selectCountBYEmployeeId();


}
